class UserLevelEntity {
  Level level;
  Title title;
  Title anchor;

  UserLevelEntity({this.level, this.title, this.anchor});

  UserLevelEntity.fromJson(Map<String, dynamic> json) {
    level = json['level'] != null ? new Level.fromJson(json['level']) : null;
    title = json['title'] != null ? new Title.fromJson(json['title']) : null;
    anchor = json['anchor'] != null ? new Title.fromJson(json['anchor']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.level != null) {
      data['level'] = this.level.toJson();
    }
    if (this.title != null) {
      data['title'] = this.title.toJson();
    }
    if (this.anchor != null) {
      data['anchor'] = this.anchor.toJson();
    }
    return data;
  }
}

class Level {
  int level;
  int nextLevel;
  int now;
  int next;
  int difference;

  Level({this.level, this.nextLevel, this.now, this.next, this.difference});

  Level.fromJson(Map<String, dynamic> json) {
    level = json['level'];
    nextLevel = json['nextLevel'];
    now = json['now'];
    next = json['next'];
    difference = json['difference'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['level'] = this.level;
    data['nextLevel'] = this.nextLevel;
    data['now'] = this.now;
    data['next'] = this.next;
    data['difference'] = this.difference;
    return data;
  }
}

class Title {
  String now;
  String next;
  int difference;

  Title({this.now, this.next, this.difference});

  Title.fromJson(Map<String, dynamic> json) {
    now = json['now'];
    next = json['next'];
    difference = json['difference'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['now'] = this.now;
    data['next'] = this.next;
    data['difference'] = this.difference;
    return data;
  }
}